<#assign prefixName = 'WHERE'>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__id??)>
	<#if (where__and__eq__id__value??)>
${prefixName} T.ID = :where__and__eq__id__value
	<#else>
${prefixName} T.ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__id??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__id__value??)>
${prefixName} T.ID <> :where__and__nq__id__value
	<#else>
${prefixName} T.ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__id??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__id__value??)>
${prefixName} T.ID = :where__or__eq__id__value
	<#else>
${prefixName} T.ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__id??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__id__value??)>
${prefixName} T.ID <> :where__or__nq__id__value
	<#else>
${prefixName} T.ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__endDaTi??)>
	<#if (where__and__eq__endDaTi__value??)>
${prefixName} T.END_DA_TI = :where__and__eq__endDaTi__value
	<#else>
${prefixName} T.END_DA_TI IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__endDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__endDaTi__value??)>
${prefixName} T.END_DA_TI <> :where__and__nq__endDaTi__value
	<#else>
${prefixName} T.END_DA_TI IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__endDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__endDaTi__value??)>
${prefixName} T.END_DA_TI = :where__or__eq__endDaTi__value
	<#else>
${prefixName} T.END_DA_TI IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__endDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__endDaTi__value??)>
${prefixName} T.END_DA_TI <> :where__or__nq__endDaTi__value
	<#else>
${prefixName} T.END_DA_TI IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__parentId??)>
	<#if (where__and__eq__parentId__value??)>
${prefixName} T.PARENT_ID = :where__and__eq__parentId__value
	<#else>
${prefixName} T.PARENT_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__parentId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__parentId__value??)>
${prefixName} T.PARENT_ID <> :where__and__nq__parentId__value
	<#else>
${prefixName} T.PARENT_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__parentId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__parentId__value??)>
${prefixName} T.PARENT_ID = :where__or__eq__parentId__value
	<#else>
${prefixName} T.PARENT_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__parentId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__parentId__value??)>
${prefixName} T.PARENT_ID <> :where__or__nq__parentId__value
	<#else>
${prefixName} T.PARENT_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__businessCo??)>
	<#if (where__and__eq__businessCo__value??)>
${prefixName} T.BUSINESS_CO = :where__and__eq__businessCo__value
	<#else>
${prefixName} T.BUSINESS_CO IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__businessCo??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__businessCo__value??)>
${prefixName} T.BUSINESS_CO <> :where__and__nq__businessCo__value
	<#else>
${prefixName} T.BUSINESS_CO IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__businessCo??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__businessCo__value??)>
${prefixName} T.BUSINESS_CO = :where__or__eq__businessCo__value
	<#else>
${prefixName} T.BUSINESS_CO IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__businessCo??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__businessCo__value??)>
${prefixName} T.BUSINESS_CO <> :where__or__nq__businessCo__value
	<#else>
${prefixName} T.BUSINESS_CO IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__name??)>
	<#if (where__and__eq__name__value??)>
${prefixName} T.NAME = :where__and__eq__name__value
	<#else>
${prefixName} T.NAME IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__name??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__name__value??)>
${prefixName} T.NAME <> :where__and__nq__name__value
	<#else>
${prefixName} T.NAME IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__name??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__name__value??)>
${prefixName} T.NAME = :where__or__eq__name__value
	<#else>
${prefixName} T.NAME IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__name??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__name__value??)>
${prefixName} T.NAME <> :where__or__nq__name__value
	<#else>
${prefixName} T.NAME IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__orderNum??)>
	<#if (where__and__eq__orderNum__value??)>
${prefixName} T.ORDER_NUM = :where__and__eq__orderNum__value
	<#else>
${prefixName} T.ORDER_NUM IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__orderNum??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__orderNum__value??)>
${prefixName} T.ORDER_NUM <> :where__and__nq__orderNum__value
	<#else>
${prefixName} T.ORDER_NUM IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__orderNum??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__orderNum__value??)>
${prefixName} T.ORDER_NUM = :where__or__eq__orderNum__value
	<#else>
${prefixName} T.ORDER_NUM IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__orderNum??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__orderNum__value??)>
${prefixName} T.ORDER_NUM <> :where__or__nq__orderNum__value
	<#else>
${prefixName} T.ORDER_NUM IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__beginDaTi??)>
	<#if (where__and__eq__beginDaTi__value??)>
${prefixName} T.BEGIN_DA_TI = :where__and__eq__beginDaTi__value
	<#else>
${prefixName} T.BEGIN_DA_TI IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__beginDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__beginDaTi__value??)>
${prefixName} T.BEGIN_DA_TI <> :where__and__nq__beginDaTi__value
	<#else>
${prefixName} T.BEGIN_DA_TI IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__beginDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__beginDaTi__value??)>
${prefixName} T.BEGIN_DA_TI = :where__or__eq__beginDaTi__value
	<#else>
${prefixName} T.BEGIN_DA_TI IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__beginDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__beginDaTi__value??)>
${prefixName} T.BEGIN_DA_TI <> :where__or__nq__beginDaTi__value
	<#else>
${prefixName} T.BEGIN_DA_TI IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__code??)>
	<#if (where__and__eq__code__value??)>
${prefixName} T.CODE = :where__and__eq__code__value
	<#else>
${prefixName} T.CODE IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__code??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__code__value??)>
${prefixName} T.CODE <> :where__and__nq__code__value
	<#else>
${prefixName} T.CODE IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__code??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__code__value??)>
${prefixName} T.CODE = :where__or__eq__code__value
	<#else>
${prefixName} T.CODE IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__code??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__code__value??)>
${prefixName} T.CODE <> :where__or__nq__code__value
	<#else>
${prefixName} T.CODE IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__typeId??)>
	<#if (where__and__eq__typeId__value??)>
${prefixName} T.TYPE_ID = :where__and__eq__typeId__value
	<#else>
${prefixName} T.TYPE_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__typeId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__typeId__value??)>
${prefixName} T.TYPE_ID <> :where__and__nq__typeId__value
	<#else>
${prefixName} T.TYPE_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__typeId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__typeId__value??)>
${prefixName} T.TYPE_ID = :where__or__eq__typeId__value
	<#else>
${prefixName} T.TYPE_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__typeId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__typeId__value??)>
${prefixName} T.TYPE_ID <> :where__or__nq__typeId__value
	<#else>
${prefixName} T.TYPE_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
